package com.clss.commandhelper.net;

/**
 * 服务器地址
 *
 * @author Liuv
 * @date 2017/4/12
 */

public final class ApiConstants {
    private static final String TAG = "ApiConstants";

    public static final int DATA_SOURCE_TYPE_DEV = 1;
    public static final int DATA_SOURCE_TYPE_TEST = 2;
    public static final int DATA_SOURCE_TYPE_ONLINE = 3;

    private static String BASE_API_HOST;
    public static String API_NAME;

    //    private static final String ONLINE_HOST = "s://xingtai.video110.cn:8000/skynet/";
    private static final String ONLINE_HOST = "s://www.video110.cn:8033/skynet/";

    private static final String TEST_HOST = "s://xingtai.video110.cn:8023/skynet/";
//    private static final String TEST_HOST = "s://www.video110.cn:1330/skynet/";
//    private static final String TEST_HOST = "s://www.video110.cn:2333/skynet/";

//        private static final String DEV_HOST = "://192.168.0.9:1080/skynet/";
//    private static final String DEV_HOST = "s://www.video110.cn:1319/skynet/";
//    private static final String DEV_HOST = "s://www.video110.cn:2333/skynet/";
//    private static final String DEV_HOST = "s://hebei.video110.cn:8000/skynet/";
//    private static final String DEV_HOST = "://192.168.0.69/skynet/";
//    private static final String DEV_HOST = "://192.168.0.9:1080/skynet/";
    private static final String DEV_HOST = "://192.168.0.72:8080/skynet/";
//    private static final String DEV_HOST = "://192.168.0.62:8080/skynet/";
//    private static final String DEV_HOST = "://192.168.0.72:8080/skynet/";
//    private static final String DEV_HOST = "://192.168.0.62:8080/skynet/";
//    private static final String DEV_HOST = "://192.168.0.73:8080/skynet/";
//    private static final String DEV_HOST = "://192.168.0.30:8080/skynet/";
//    private static final String DEV_HOST = "://192.168.0.71:8080/skynet/";
//    private static final String DEV_HOST = "://192.168.0.7:8080/skynet/";
//    private static final String DEV_HOST = "://192.168.0.7:8099/skynet/";
//    private static final String DEV_HOST = "://192.168.0.70:8080/skynet/";

    private static String getApiHost(){
        return "http" + BASE_API_HOST;
    }

    public static String getUploadImageUrl(){
        return getApiHost() + "api/uploadFile";
    }
    public static String getZoneUploadUrl(){
        return getApiHost() + "api/zone/upload";
    }

    public static String getDocumentDetail(String id){
        return getApiHost() + "web/document/view/" + id;
    }

    public static String getShowOutsideDocDetailUrl(String id){
        return getApiHost() + "api/lawOnline/phoneView/" + id;
    }

    public static String getUploadFileUrl(String id){
        return getApiHost() + "web/file/" + id;
    }
    public static String getUploadEvidenceUrl(){
        return getApiHost() + "api/uploadFileExact";
    }
    public static String getStompApiHost(){
        return "ws" + BASE_API_HOST + "ws/websocket";
    }

    public static String sChooseApi(int which){
        switch (which){
            case DATA_SOURCE_TYPE_DEV:
                BASE_API_HOST = DEV_HOST;
                API_NAME = "DEV";
                break;
            case DATA_SOURCE_TYPE_TEST:
                BASE_API_HOST = TEST_HOST;
                API_NAME = "TEST";
                break;
            case DATA_SOURCE_TYPE_ONLINE:
                BASE_API_HOST = ONLINE_HOST;
                API_NAME = "ONLINE";
                break;
            default:
        }
        return getApiHost();
    }
}